package com.whut.community.domain.po;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("post_image")
public class PostImage {
    /**
     * 图片id
     */
    @TableId(value = "image_id", type = IdType.ASSIGN_ID)
    private Long imageId;

    /**
     * 帖子id
     */
    @TableField(value = "post_id")
    private Long postId;

    /**
     * 图片url
     */
    @TableField(value = "image_url")
    private String imageUrl;

    /**
     * 图片显示顺序
     */
    @TableField(value = "display_order")
    private Integer displayOrder;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 逻辑删除
     */
    @TableLogic(value = "0", delval = "1")
    private Integer isDeleted;
}
